﻿using System;
using System.Collections.Generic;

namespace Netbits.Common.Collections
{
	/// <summary>
	/// Represents an extended interface for lists.
	/// </summary>
	/// <typeparam name="TSender">Type of the sender.</typeparam>
	/// <typeparam name="TItem">Type of the Items</typeparam>
	public interface IExtended<TSender, TItem> : IEnumerableExtended<TItem>, ICollectionEvents<TSender,TItem>
	{
		/// <summary>
		/// Get or sets the maximum items that the list can contains.
		/// </summary>
		int MaxItems
		{
			get;
			set;
		}

		/// <summary>
		/// Creates a copy of all items in the list in a new List
		/// </summary>
		/// <returns>The new list</returns>
		List<TItem> CopyToNewList();
	}
}
